Skip to content

feat: Resolve enums and classes with PSR-4 - #377

Open
CarlSchwan wants to merge 1 commit into
mainfrom
carl/psr4-enums
Open

feat: Resolve enums and classes with PSR-4#377
CarlSchwan wants to merge 1 commit into
mainfrom
carl/psr4-enums

Conversation

@CarlSchwan

Copy link
Copy Markdown
Member

Replace the manual parsing of every files by a class loader using PSR-4. This class loader is then used by an enum loader.

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Comment thread generate-spec.php
Assisted-by: ClaudeCode:claude-sonnet-5
Signed-off-by: Carl Schwan <carl@carlschwan.eu>

@provokateurin provokateurin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice! Just one thing I'm not sure about.

Comment thread src/EnumResolver.php
Comment on lines +79 to +80
type: $node->scalarType->name === 'int' ? 'integer' : 'string',
format: $node->scalarType->name === 'int' ? 'int64' : null,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if $name could also be integer in some cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants